import argparse
from tensorflow import keras
import json
import numpy as np

parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file', help='model file')
parser.add_argument('-p', '--param', help='param')

args = parser.parse_args()
print(f'model file: {args.file}')
print(f'predict param: {args.param}')

try:
    model_file = args.file
    param = json.loads(args.param)
    data = np.array(param).astype(np.float32)
    model = keras.models.load_model(model_file)
    predict = 1
    print(f'predict-result:{predict}')
except Exception as e:
    print(f'predict-error:{e}')

